import {createStore} from 'vuex'

export default createStore({
    state: {
        user: {
            username: '',
            role: {
                roleId: 0,
                role_name: ''
            }
        }
    },
    getters: {
        user: (state) => {
            return state.user;
        }

    },
    mutations: {
        setUser:function (state,user) {
            state.user =user;
        }
    },
    actions: {},
    modules: {}
})
